import { createRouter, createWebHashHistory } from 'vue-router'
const routerHash = createWebHashHistory()

import routes from './routes.js'
import demoRoutes from './demo.js'
const router = createRouter({
  history: routerHash,
  scrollBehavior() {
    //解决路由跳转页面不置顶的问题
    return {
      top: 0
    }
  },
  routes: [...routes, ...demoRoutes]
})
export default router
